<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'blocks-form',
	'enableAjaxValidation'=>false,
)); ?>
	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>60,'maxlength'=>200)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'body'); ?>
		<?php $this->widget('application.components.TinyMceWidget', array(
            'model'=>$model,
            'attribute'=>'body',
            'editorOptions'=>array(
                'width'=>'700',
                'height'=>'300',
            ),
        ));
        ?>
		<?php echo $form->error($model,'body'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'position'); ?>
		<?php echo $form->dropDownList($model,'position', Yii::app()->params['blockPosition']); ?>
		<?php echo $form->error($model,'position'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'published'); ?>
        <?php echo $form->dropDownList($model,'published', array('1' => 'Да', '0' => 'Нет')); ?>
		<?php echo $form->error($model,'published'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Создать' : 'Сохранить'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->